package com.allwees.bs.module.oms.rest;

import com.allwees.bs.core.modelbase.vo.R;
import com.allwees.bs.module.core.rest.BoCrudApi;
import com.allwees.bs.module.oms.entity.OrderItemCancelEntity;
import com.allwees.bs.module.oms.service.OrderItemCancelService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/backstage/api/order_item_cancel")
public class OrderItemCancelApi extends BoCrudApi<OrderItemCancelEntity, OrderItemCancelService> {


    /**
     * 获取COD订单取消原因
     *
     * @param orderItemUuid
     * @return
     */
    @GetMapping("/get_cancel_reason/{orderItemUuid}")
    public R getCancelReason(@PathVariable String orderItemUuid) {
        return    R.ok( boService.getCancelReason(orderItemUuid));
    }
}
